package com.anyisn.anyflickr.modules.PhotosSlide.controller
{
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	import com.anyisn.anyflickr.modules.PhotosSlide.PhotosSlideModule;
	import com.anyisn.anyflickr.modules.PhotosSlide.view.ModuleJunctionMediator;
	import com.anyisn.anyflickr.modules.PhotosSlide.view.PhotosSlideWindowMediator;
	import com.anyisn.anyflickr.modules.PhotosSlide.view.component.PhotosSlideWindow;

	public class ViewPrepCommand extends SimpleCommand
	{
		override public function execute(notification:INotification) : void {
			facade.registerMediator(new ModuleJunctionMediator());
			var module:PhotosSlideModule = notification.getBody() as PhotosSlideModule;
			var psWin:PhotosSlideWindow = new PhotosSlideWindow();
			psWin.plVO = module.plVO;
			psWin.delay = module.delay;
			psWin.moduleID = module.getID();
			facade.registerMediator(new PhotosSlideWindowMediator(psWin));
		}
	}
}